#include <stdio.h>
#include <sys/ipc.h>

int main(){
    key_t key = ftok("/tmp",'A');
    if(key == EOF){
        perror("ftok");
        return 1;
    }

    printf("ftok generate key is %d\n", key);
    printf("ftok generate key is %x\n", key);
    return 0;
}